The present invention relates to an image encoding device.
In a facsimile terminal or a printing terminal, for instance, an image to be transmitted or an image received is stored in a page memory. Also, in an image editing device, an image to be edited or an image edited is similarly stored in a page memory. The required capacity of the page memory is increased as the size of the image is increased and also as the resolution of the image is enhanced. Further, when a color image is to be stored, a capacity three times as large as in a monochromatic image is required. For example, when a full four-color image of A3 size having 16770 thousand colors/pixel is stored at a resolution of 400 dpi (dot/inch), a memory capacity of the page memory may be as great as 96M byte. Generally, the increase in memory capacity leads to a long processing time and a high cost.
As a solution of such problems, a technique decreasing the amount of data of image signals using data encoding has been proposed. For example, it has been proposed that an image signal is encoded highly efficiently in such a form that the image signal can be edited while it remains in an encoded state.
Such encoding requires the following three characteristic
First, the compressibility of every image unit must be uniform. Since the page memory has a predetermined limited capacity, data encoded at a preset compressibility as to every process unit of the original image signals must be accommodate in the page memory independent of the original image data. The image unit, in this case, necessarily has the capacity of at least one page. Especially in the case of the image editing device in which the data is edited as it is, the image unit necessarily is of a portion into which the data of one page is divided, for example, a block unit of 8 pixels.times.8 lines.
Second, it is necessary that every block unit can be encoded/decoded independently. This assures that the data can be edited as it is.
Third, the algorithm of image processing must be uniform among the types of images. This assures a high and constant speed of processing because encoded data can be written into and read out of the page memory.
Generally, prior image encoding devices for image accumulation and data transmission have restricted visual redundancy and statistical redundancy. Compressibility of such image encoding devices varies according to the fluctuation of any redundancy of the image data. Further, there has been a tendency to introduce a higher level of encoding processing, which makes it difficult to execute the encoding/decoding processing independently in every given image division unit. Further, due to the introduction of adaptive processing, a quantity of operation necessary for the encoding/decoding processing varies greatly according to the variations of redundancy in each of the image signals. For these and other reasons, with such a conventional image encoding device for image accumulation and data transmission, it is difficult to satisfy the above-mentioned characteristics.
As a technique to satisfy the above characteristics, image encoding devices such as disclosed in Japanese Laid Open publication Hei. 5-56282, assigned to the same assignee as the present invention, are constructed so as to accomplish constant compressibility of the input data by selecting a particular parameter set from possible parameters consisting of a sub-sampling shape, a sub-sampling ratio, and possible parameters as to tone level. The parameter set is predetermined to result in constant compressibility in every input block. However, the above image encoding devices are not constructed so as to restrict statistical redundancy. If an encoding means is added to restrict the statistical redundancy of the image encoding device, it is further necessary to add a control means of the amount of encoding data for constant compressibility to cope with a fluctuation of local redundancy.
Regarding the control of the amount of encoding data, there is proposed a thesis entitled "Bit-Rate Control Method for DCT (discrete cosine transform) Imaging Coding D-45" and a thesis entitled "A Rate-Adaptive DCT Coding for use in Solid-State Still Camera D-159" at an autumn meeting held by The Institute of Electronics Information and Communication Engineers.
The data encoding device of the JPEG type such as shown in D-45 comprises a blocking means for sampling an image and dividing the image into input blocks each consisting of a plurality of pixels, DCT transforming means for DCT transforming a pixel value in the block, storage means for temporarily storing coefficients of the conversion which have been converted, quantizing means quantizing the coefficients in a given resolution step, variable length coding means for variably encoding the output from the quantizing means, and measuring/inferring means for measuring the amounts of the output from the coding means and inferring a possible quantizing step according to the result of the measurement which will accomplish the given amount of encoding in every block. The means repeats measuring and inferring until the possible quantizing step for the given amount of encoding is found in such a manner that the amount of encoding is randomly counted under one of several, preset selected conditions.
However, since the data encoding device of this type necessarily has control errors in the amount of encoding, the data structure in this type of data encoding device has a margin of error for the given amount of encoding. The data encoding device of this type has an unfixed algorithm which could not determine when the amount of encoding reaches the given amount of encoding. Further it is necessary to provide for countermeasures in case of overflow of encoded data.
Reference is made to the data encoding device of the type disclosed in D-159 which comprises a blocking means for sampling an image and dividing the image into input blocks each consisting of a plurality of pixels, means for quantizing the DC composition of the block, means for determining the number of bits on encoding in each block on the basis of a step size according to the activity of each block, means for Huffman encoding the result of the quantizing so as to restrict the amount of encoding within the set amount determined by the number of bits on encoding, transformation means for DCT transforming a pixel value in the block, means for storing the coefficients of the DCT transformation which has been transformed, means for quantizing the coefficients of the DCT transformation on the basis of the step size aforementioned, means for Huffman encoding the result of the quantizing as to AC composition of the block so as to restrict the amount of encoding within the set amount determined by the number of bits on encoding, and a multiplexer for composing a DC encoding result and an AC encoding result. The encoding means for AC composition of the block are constructed so that while encoding the coefficients of the DCT transformation in a zig-zag scan in the storing means the execution of the encoding halts at the point when the amount of the AC encoding reaches a predetermined value.
The prior art such as shown in D-45 and D-159 has restriction means for controlling the amount of encoding. However, the encoded/decoded image attained by the prior art has room for improving. Since the prior art such as shown in D-45 and D-159 has to prepare a pretreatment, such as a preparation of a particular quantizing step size, etc., it is difficult to incorporate the encoded device shown in the prior art into an image encoding device for image accumulation and data transmission.